<?php include('header.php'); ?>

<div class="container grid">
    <?= get_sidebar() ?>
    <div>
        <section class="mths"></section>
        <h2>
            <a href="#" title=" قراءات ذات صلة"> قراءات ذات صلة</a>
        </h2>
        <section class="grid imglrnews">
            <?php
            $random_posts = get_random_posts(10);
            foreach ($random_posts as $post) {
            ?>
                <a class="grid" href="<?= $post['link'] ?>" title="<?= $post['title'] ?>">
                    <img src="<?= $post['thumbnail'] ?>" alt="<?= $post['title'] ?>">
                    <section class="grid pd">
                        <h3 class="nowrap2"><?= $post['title'] ?></h3>
                    </section>
                </a>
            <?php
            }
            ?>
        </section>

        <h2>
            قراءات ذات صلة
        </h2>
        <section class="grid txtnews">
            <?php
            $random_posts = get_random_posts(10);
            foreach ($random_posts as $post) {
            ?>
                <a class="grid bd" href="<?= $post['link'] ?>" title="<?= $post['title'] ?>">
                    <h3 class="nowrap2"><?= $post['title'] ?></h3>
                    <p><?= $post['excerpt'] ?></p>
                    <span><?= $post['date'] ?></span>
                </a>
            <?php
            }
            ?>
        </section>
    </div>
</div>



<?php include('footer.php'); ?>